"use client";
import "@rainbow-me/rainbowkit/styles.css";
import type { AppProps } from "next/app";
import type { Metadata } from "next";
import Script from 'next/script'

import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { WagmiProvider } from "wagmi";
import { RainbowKitProvider } from "@rainbow-me/rainbowkit";

import { config } from "../../wagmi";

const client = new QueryClient();

import { Inter } from "next/font/google";
import { AntdRegistry } from "@ant-design/nextjs-registry";
import { getTranslations } from "next-intl/server";
import "./globals.css";

const inter = Inter({ subsets: ["latin"] });

type Props = {
  children: React.ReactNode;
  params: { locale: string };
};


export default function BasicLayout({
  children,
  params: { locale },
}: Readonly<Props>) {
  return (
    <html lang={locale}>
      <head></head>
      <body className={inter.className}>
        <WagmiProvider config={config}>
          <QueryClientProvider client={client}>
            <RainbowKitProvider>
              <AntdRegistry>{children}</AntdRegistry>
            </RainbowKitProvider>
          </QueryClientProvider>
        </WagmiProvider>
      </body>
    </html>
  );
}
